package com.xius;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.annotation.Import;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import springfox.documentation.spring.web.SpringfoxWebMvcConfiguration;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

@SpringBootApplication
@MapperScan(basePackages = {"com.xius.dao"}) //扫描DAO
@ServletComponentScan(basePackages = {"com.xius.filter"}) //过滤器生效
//@EnableSwagger2//Swagger2 生效
@Import(cn.hutool.extra.spring.SpringUtil.class)//让SpringUtil在定时任务中可以找到bean
public class SpringbootMybatisplusApplication {
    public static void main(String[] args) {
        SpringApplication app = new SpringApplication(SpringbootMybatisplusApplication.class);
        //检测启动后执行代码
        app.addListeners(new ApplicationStartup());
        app.run(args);
    }
}
